import { ApiProperty } from '@nestjs/swagger';
import { IsNotEmpty, IsString } from 'class-validator';

export class CreateFileDto {
  @ApiProperty({
    description: '原名称',
  })
  @IsNotEmpty()
  originalName: string;

  @ApiProperty({
    description: '文件名',
  })
  @IsNotEmpty()
  fileName: string;

  @ApiProperty({
    description: '文件路径',
  })
  @IsNotEmpty()
  filePath: string;

  @ApiProperty({
    description: '',
  })
  @IsNotEmpty()
  mimetype: string;

  @ApiProperty({
    description: '尺寸',
  })
  @IsNotEmpty()
  size: number;

  @ApiProperty({
    description: '链接',
  })
  @IsString()
  @IsNotEmpty()
  url: string;
}
